package backpage.mapper;

import backpage.entity.AnnualLeave;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AnnualLeaveMapper extends BaseMapper<AnnualLeave> {

    // 自定义部门范围查询
    @Select("SELECT * FROM annual_leave WHERE department_id = #{deptId}")
    List<AnnualLeave> selectByDepartment(@Param("deptId") Integer deptId);
}